package com.jwds.digital.bios.business.rpc.feign;

import com.jwds.digital.bios.business.core.infrastructure.dto.feign.BasicDictReqDTO;
import com.jwds.digital.bios.business.core.infrastructure.vo.feign.BasicDictRespVO;
import com.jwds.digital.bios.business.rpc.feign.fallback.BasicDictFeignFallBack;
import com.jwds.digital.bios.business.rpc.feign.fallback.BasicStockBinFallBack;
import com.jwds.tdc.framework.application.lib.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 字典基本信息Feign
 *
 * @Author hesong
 */
@FeignClient(name = "bios-flow", path = "/basic/dict",fallback = BasicDictFeignFallBack.class)
public interface BasicDictFeign {
    /**
     * 根据id查询
     *
     * @param id 数据ID
     * @return BaseResponse
     */
    @GetMapping("/{id}")
    BaseResponse<BasicDictRespVO> queryById(@PathVariable("id") Long id);


    /**
     * 列表查询
     *
     * @param reqDto 查询条件
     * @return BaseResponse
     */
    @PostMapping("/all")
    BaseResponse<List<BasicDictRespVO>> list(@RequestBody BasicDictReqDTO reqDto);
}
